import { request } from "@/api/request";

export const $carApplication = {
  // 专车查询
  search: data => request({
    url: '/inner/apply/searchLandTransportApplyInfo',
    method: 'post',
    data
  }),
  // 获取承运人
  findAllagentCode: data => request({
    url: '/inner/apply/findAllagentCode'
  })
}

// 运输状态跟踪
export const $transTracking = {
  // 查询
  search: params => request({
    url: 'innerHandheld/apply/searchTrackInfo',
    method: 'post',
    data: params
  }),
}

// 运输管理
export const $transManagement = {
  // 查询
  search: params => request({
    url: 'inner/manage/searchManagerInfo',
    method: 'post',
    data: params
  }),
  // 车辆配载
  vehicleStowage: params => request({
    url: 'inner/manage/vehicleStowage',
    method: 'post',
    data: params
  }),
  // 已发车
  carStart: params => request({
    url: 'inner/manage/carStart',
    method: 'post',
    data: params
  }),
  // 已签收
  signedIn: params => request({
    url: 'inner/manage/signedIn',
    method: 'post',
    data: params
  }),
  // 已到达
  carArrived: params => request({
    url: 'inner/manage/carArrived',
    method: 'post',
    data: params
  })
}

// 陆运签收
export const $landSign = {
  getLandInfo: params => request({
    url: '/innerHandheld/apply/getLandInfo',
    method: 'get',
    params
  }),
  getCargoInfo: params => request({
    url: '/innerHandheld/apply/getCargoInfo',
    method: 'get',
    params
  }),
  signedIn: data => request({
    url: '/innerHandheld/apply/signedIn',
    method: 'post',
    data
  })
}
